﻿@using Abp.Authorization.Users
@using DevM.Web.Startup
@model DevM.Web.Models.ReleaseRecord.ReleaseLogListViewModel
@{
    ViewBag.CurrentPageName = PageNames.ReleaseLogs; // The menu item will be active for this page.
}
@section scripts
{
    <script src="~/js/boostrap-pagination.js"></script>
    <script src="~/view-resources/Views/ReleaseRecords/ReleaseLogs.js" asp-append-version="true"></script>
}
<ol class="breadcrumb">
    <li><a href="@Url.Action("Index","Projects")">@L("Projects")</a></li>
    <li class="active">@L("ReleaseLogs")</li>
</ol>
<div class="row clearfix">
    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <div class="card">
            <div class="header">
                <h2>
                    @L("ReleaseLogs") : @Model.Project.Name
                </h2>
                <ul class="header-dropdown m-r--5">
                    <li class="dropdown">
                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                            <i class="material-icons">more_vert</i>
                        </a>
                        <ul class="dropdown-menu pull-right">
                            <li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>@L("Refresh")</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="body table-responsive">
                <div>
                    @foreach (var item in Model.ReleaseLogs.Items)
                    {
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <i class="glyphicon glyphicon-tags" style="@("color:"+item.ReleaseEnvironment.Color)">&nbsp;</i>
                                <span>@($"{L("PublishAt")} ：{item.CreationTime.ToString("yyyy-MM-dd HH:mm:ss")}")</span>
                               
                            </div>
                            <div class="panel-body">
                                <p>@L("Environment")：@item.ReleaseEnvironment.Name,@item.ReleaseEnvironment.Host</p>
                                <p>@L("Log")：@item.Log</p>
                                <p>@L("Memo")：@item.Memo</p>
                                <div class=" badge-feedbacktotal" data-releaselogid="@item.Id" style="margin-left:1px">
                                    <span col-lg-3 col-md-3 col-sm-3 col-xs-3>
                                        <span class="badge badge-feedbacktotal-pending" style="background:#ff0000" title="@L("Pending")">0</span>
                                    </span>
                                    <span col-lg-3 col-md-3 col-sm-3 col-xs-3>
                                        <span class="badge badge-feedbacktotal-claimed" style="background:#ec971f" title="@L("Claimed")">0</span>
                                    </span>
                                    <span col-lg-3 col-md-3 col-sm-3 col-xs-3>
                                        <span class="badge badge-feedbacktotal-processing" style="background:#337ab7" title="@L("Processing")">0</span>
                                    </span>
                                    <span col-lg-3 col-md-3 col-sm-3 col-xs-3>
                                        <span class="badge badge-feedbacktotal-processed" style="background:#449d44" title="@L("Processed")">0</span>
                                    </span>

                                    <button type="button" data-feedback-releaselogid="@item.Id" class="btn btn-xs btn-warning pull-right btn-feedback">@L("Feedback")</button>
                                </div>
                            </div>
                        </div>
                    }
                </div>
                <nav aria-label="Page navigation">
                    <ul class="pagination" data-total="@Model.ReleaseLogs.TotalCount">
                        <li>
                            <a href="#" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li class="active"><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li>
                            <a href="#" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
    </div>
</div>



